import { reactive, ref, toRefs } from "vue";

const tableList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const tableNames = ref([]);
const dateRange = ref([]);
const uniqueId = ref("");
const defaultSort = ref({ prop: "createTime", order: "descending" });

const data = reactive({
    queryParams: {
      pageNum: 1,
      pageSize: 10,
      tableName: undefined,
      tableComment: undefined,
      orderByColumn: defaultSort.value.prop,
      isAsc: defaultSort.value.order,
    },
    preview: {
      open: false,
      title: "代码预览",
      data: {},
      activeName: "domain.java",
    },
  });

  
const { queryParams, preview } = toRefs(data);

const selectedDataSource = ref('');

const options=ref( [
        { value: 'a', label: 'a' },
        { value: 'b', label: 'b' },
        { value: 'c', label: 'c' },
      ])


export {
    selectedDataSource,
    options,
    queryParams,
    preview,
    tableList,
    loading,
    showSearch,
    ids,
    single,
    multiple,
    total,
    tableNames,
    dateRange,
    uniqueId,
    defaultSort,
}      